<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html
	class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg no-smil svgclippaths">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>XToolsCRM- easy to Power</title>
<link href="css/tocss/bootstrap-datepicker3.min.css" rel="stylesheet">
<link href="../css/zcss/switchery.min.css" rel="stylesheet">
<link href="../css/zcss/bootstrap-clockpicker.min.css" rel="stylesheet">
<link href="../css/zcss/bootstrap-table.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/bootstrap.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/bootstrap-select.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/core.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/components.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/icons.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/pages.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/responsive.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/sweetalert.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/custombox.min.css" rel="stylesheet">
<link href="../css/zcss/animate.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/css.css" rel="stylesheet" type="text/css">

<link href="../css/zcss/bootstrap-datepicker3.min.css" rel="stylesheet">
<link href="../css/zcss/switchery.min.css" rel="stylesheet">
<link href="../css/zcss/bootstrap-clockpicker.min.css" rel="stylesheet">
<link href="../css/zcss/bootstrap-table.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/bootstrap.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/bootstrap-select.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/core.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/components.css" rel="stylesheet" type="text/css">

<!--图标的外部样式-->
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/icons.css"
	rel="stylesheet" type="text/css">
<!--图标的外部样式-->



<link href="../css/zcss/pages.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/responsive.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/sweetalert.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/custombox.min.css" rel="stylesheet">
<link href="../css/zcss/animate.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/css.css" rel="stylesheet" type="text/css">

<script src="http://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet"
	href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="../js/axios.js"></script>
<script type="text/javascript" src="../js/qs.js"></script>

<style>
.el-dropdown-link {
	cursor: pointer;
	color: #000;
}

.types:hover {
	border: 1px solid #000;
}

.el-icon--right {
	float: right;
	line-height: 40px;
}

.el-icon-arrow-down {
	font-size: 12px;
}
</style>
</head>

<body class="fixed-left modal-open"
	style="padding-right: 16px; overflow: auto;" onload=";">

	<div class="createOrderbox"
		style="width: 800px; height: 1098.62px; margin: 0 auto;"
		id="createOrderbox">
		<div id="popshowcont">
			<div id="gedit">
				<div id="editgedit"
					style="position: absolute; display: none; &amp; amp; amp; #9; left: 0; &amp; amp; amp; #9; top: 0; width: 0; &amp; amp; amp; #9; height: 0; z-index: 100; background-color: #D4D0C8;">
					<iframe name="editsubgedit" src="/a.html" scrolling="no"
						style="width: 0; height: 0; border: 0;"></iframe>
				</div>
				<form name="formedit_gedit" class="form-horizontal"
					action="/system/editok.xt" enctype="multipart/form-data"
					method="POST" target="editsubgedit" novalidate=""
					autocomplete="off">
					<input name="mdb" type="hidden"
						value="800c327aefb3f9241513cbf551abbfda"><input
						name="comname" type="hidden" value="gedit"><input
						name="db" type="hidden" value="contract"><input
						name="retjava" type="hidden"
						value="b7gsTKoUGZph2X0lGZld2Xkx2biVnLw9GdgsTKoUGdhRGc1JGZu92XrNWasN2X0lGZldmLw9Gd"><input
						name="type" type="hidden" value="insert"><input
						name="dt_contract_id" type="hidden" value=""><input
						name="dt_contract_viewtype" type="hidden" value="1"><input
						name="dt_contract_money_type" type="hidden" value=""><input
						name="dt_contract_money_rate" type="hidden" value=""><input
						name="dt_contract_bl_flag" type="hidden" value=""><input
						name="dt_contract_prj_id" type="hidden" value="0"><input
						name="dt_contract__prj_id" type="hidden" value="">
					<div class="portlet form-horizontal border-n">
						<div class="portlet-heading portlet-default">

							<div class="pull-right  f-s-12">

								<!--<span class="button_close_qshow"><button type="button" class="btn btn-white waves-effect waves-light" data-dismiss="modal" aria-hidden="true"><i class="fa fa-close m-r-5"></i>关闭</button></span>-->
								<div class="btn-save">
									<input name="B0"
										class=" m-l-5 btn btn-white  waves-effect waves-light"
										style="padding-left: 30px"
										@click="submitForm('ruleForm')"
										type="submit" value="保存" set-lan="value:保存">
								</div>
							</div>

							<h4 class="modal-title text-dark">
								<span set-lan="html:订单">订单</span>

							</h4>
							<hr class="border-t-a">

						</div>
						<div class="gedit_scroll_content">
							<div class="panel-collapse collapse in" id="bg-default">
								<el-form :model="ruleForm" :rules="rules" ref="ruleForm"
									class="demo-ruleForm" style="padding-left: 25px;"> <!--主题-->
										<el-row :gutter="20">
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">主题:</div>
											</el-col>
											<el-col :span="16">
												<el-form-item prop="titles">
													<el-input v-model="ruleForm.titles" :span="16" placeholder="请输入内容"></el-input>
												</el-form-item>
											</el-col>
										</el-row>
										<br />

										<!--客户-->
										<el-row :gutter="20">
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">选择客户:</div>
											</el-col>
											<el-col :span="16" style="height: 45px; margin-bottom: 20;">
												<el-form-item prop="costomers">
													<el-input v-model="ruleForm.costomers" :span="16" placeholder=" " disabled></el-input>
												</el-form-item>
												
												
											</el-col>
										</el-row>
										<br/>

										<!--客户查询-->
										<el-row :gutter="20">
											<!--<el-col :span="6" style="margin-left: 133px; margin-right: 0px;">
												<el-input v-model="ruleForm.costomersfind" :span="16" placeholder="请输入内容"></el-input>
											</el-col>-->

										<!--客户查询-->
											<el-col :span="6" style="margin-left: 133px; margin-right: 0px;">
												<!-- <div class="sub-title">输入后匹配输入建议</div> -->
												<el-autocomplete class="inline-input" v-model="ruleForm.costomersfind" :fetch-suggestions="querySearch" placeholder="请输入内容" :trigger-on-focus="false" @select="handleSelect" style="width:300px">
												<template slot-scope="{ item }" style="width:350px">
  														  <div class="name" style="width:350px">{{ item.cus_name }} ( id:{{ item.cus_id }} create:{{ item.cus_credate }})</div>
												  </template>
												</el-autocomplete>
											</el-col>
										<!--客户查询-->

											<el-col :span="2" style="margin-left: 0;padding-left: 0;width:44px;height: 32px;">
												<el-button size="small" icon="el-icon-search" style="margin-top: 5px;"></el-button>
											</el-col>
											<el-col :span="2" style="margin-left: 0;padding-left: 0;margin-left: 5px;">
												<el-button size="small" icon="el-icon-more" style="margin-top: 5px; margin-left: 0;"></el-button>
											</el-col>
										</el-row>
										<br />

										<!--订单号、分类-->
										<el-row :gutter="20">

											<!--订单号-->
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">订单号:</div>
											</el-col>
											<el-col :span="7">
												<span>(开头字母自动)</span>
												<el-input v-model="ruleForm.orderid" :span="16" type="number" placeholder="请输入内容"></el-input>
												<!-- <el-date-picker v-model="ruleForm.orderid" type="date" placeholder="选择日期">
												</el-date-picker> -->
												<p>(编号自动) <i class="fa fa-cog"></i></p>
											</el-col>

											<!--分类-->
											<el-col :span="2">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">分类:</div>
											</el-col>
											<el-col :span="7">
												<el-form-item prop="cartyrs">
												
												
													
												<el-select v-model="ruleForm.cartyrs" filterable placeholder="请选择" style="width: 220px;">
    													<el-option :key="3001" label="产品销售" :value="3001" ></el-option>
    													<el-option :key="3002" label="服务" :value="3002"></el-option>
    													<el-option :key="3003" label="业务合作" :value="3003"></el-option>
    													<el-option :key="3004" label="代理分销" :value="3004"></el-option>
  													</el-select>
													
												</el-form-item>
											</el-col>
											<i class="fa fa-book" style="line-height: 40px;line-height: 40px;"></i>

										</el-row>
										<br />

										<!--付款方式、对应机会-->
										<el-row :gutter="20">

											<!--付款方式-->
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">付款方式:</div>
											</el-col>
											<el-col :span="6">
												<el-form-item prop="paytypes">
													
													
													<el-select v-model="ruleForm.paytypes" filterable placeholder="请选择" style="width: 220px;">
    													<el-option :key="3006" label="现金" :value="3006" ></el-option>
    													<el-option :key="3007" label="支票" :value="3007"></el-option>
    													<el-option :key="3008" label="邮政汇款" :value="3008"></el-option>
    													<el-option :key="3009" label="网上银行" :value="3009"></el-option>
  													</el-select>
													
													
												</el-form-item>
											</el-col>

											<!--对应机会-->
											<el-col :span="3">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">对应机会:</div>
											</el-col>
											<el-col :span="6">
												
												
												
													<!-- <el-select v-model="ruleForm.opportunity" filterable placeholder="请选择" style="width: 220px;">
    													<el-option :key="3001" label="one" :value="3001" ></el-option>
    													<el-option :key="3002" label="two" :value="3002"></el-option>
    													<el-option :key="3003" label="three" :value="3003"></el-option>
    													<el-option :key="3004" label="four" :value="3004"></el-option>
  													</el-select> -->
  													
  													<el-select v-model="ruleForm.opportunity" placeholder="请选择"
																	style="width: 220px;"> <el-option
																	v-for="item in oppitem" :key="item.opp_ids"
																	:label="item.opp_name" :value="item.opp_ids"> </el-option> </el-select>
													
													
											</el-col>
										</el-row>
										<br />

										<!--发货金额、回款金额-->
										<el-row :gutter="20">
											<!--发货金额、汇款金额-->
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">发货金额:</div>
											</el-col>
											<el-col :span="6" style="width: 220px;">
												<el-input v-model="ruleForm.havegmoney" :span="16" disabled style="width: 220px;"></el-input>
											</el-col>

											<!--发货金额、回款金额-->
											<el-col :span="2 " style="width: 80px;">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;"> 回款金额:</div>
											</el-col>
											<el-col :span="7">
												<el-input v-model="ruleForm.sellmoney" disabled style="width: 220px;"></el-input>
											</el-col>
										</el-row>
										<br />

										<!--发货日期、最晚发货日期-->
										<el-row :gutter="20">

											<!--发货日期-->
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">发货日期:</div>
											</el-col>
											<el-col :span="6">
												<!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
												<el-form-item prop="havetime">
													<el-date-picker v-model="ruleForm.havetime" type="date" placeholder="选择日期" :picker-options="pickerOptions0">
													</el-date-picker>
												</el-form-item>
											</el-col>

											<!--最晚发货日期-->
											<el-col :span="3" style="padding-left:5px;width: 100px;text-align: right;">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">最晚发货:</div>
											</el-col>
											<el-col :span="7">
												<!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
												<el-form-item prop="haveoldtime">
													<el-date-picker v-model="ruleForm.haveoldtime" type="date" placeholder="选择日期" :picker-options="pickerOptions0">
													</el-date-picker>
												</el-form-item>
											</el-col>

										</el-row>
										<br />

										<!--客户签约人、发货-->
										<el-row :gutter="20">

											<!--客户签约人-->
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">客户签约人:</div>
											</el-col>
											<el-col :span="7">
												<el-form-item prop="qmans">
													
													
													<el-select v-model="ruleForm.qmans" placeholder="请选择" style="width: 220px;">
    													<el-option
     													 v-for="item in customertoman"
     													 :key="item.linId"
      													 :label="item.linName"
      													 :value="item.linId">
    													</el-option>
  													</el-select>
  													
  													
  													
												</el-form-item>
											</el-col>
											
											
											

											<!--发货-->
											<el-col :span="2">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">发货:</div>
											</el-col>
											<el-col :span="7">
												<!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
												<el-input v-model="ruleForm.sellgoods" disabled style="width: 220px;"></el-input>
											</el-col>

										</el-row>
										<br />

										<!--所有人、退货-->
										<el-row :gutter="20">

											<!--所有人-->
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">所有人:</div>
											</el-col>
											<el-col :span="7">


												<el-form-item prop="users">
											<el-select v-model="ruleForm.users" filterable placeholder="请选择" style="width: 220px;">
    													<el-option
     													 v-for="item in options"
     													 :key="item.useid"
      													 :label="item.name"
      													 :value="item.useid">
    													</el-option>
  													</el-select>
												
													
												</el-form-item>
											</el-col>

											<!--退货-->
											<el-col :span="2">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">退货:</div>
											</el-col>
											<el-col :span="7">
												<!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
												<el-input v-model="ruleForm.returngoods" disabled style="width: 220px;"></el-input>
											</el-col>

										</el-row>
										<br />

										<!--状态、结款方式-->
										<el-row :gutter="20">

											<!--状态-->
											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">状态:</div>
											</el-col>
											<el-col :span="6">

												<el-form-item prop="radio2">
													<el-radio-group v-model="ruleForm.radio2">
														<el-radio :label="3" style="margin-left: 0px;">执行中</el-radio>
														<el-radio :label="6" style="margin-left: 10px;">结束</el-radio>
														<el-radio :label="9" style="margin-left: 0px;">意外终止</el-radio>
													</el-radio-group>
												</el-form-item>

											</el-col>

											<!--结款方式-->
											<el-col :span="3" style="padding-left:5px;width: 100px;text-align: right;">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">结款方式:</div>
											</el-col>
											<el-col :span="7">
												<el-form-item prop="endmoney">
													<!-- <el-dropdown trigger="click" @command="handleCommand6">
														<span class="el-dropdown-link types" style="display: inline-block; width: 220px;height: 40px;border: 1px solid #ddd;border-radius: 5px;vertical-align: middle;line-height: 40px;padding-right: 10px;">
        <span style="text-align: left;margin-left: 10px;">{{ruleForm.endmoney}}</span><i class="el-icon-arrow-down el-icon--right"></i>
														</span>
														<el-dropdown-menu slot="dropdown" style="width: 220px;">
															<el-dropdown-item command="aa">aa</el-dropdown-item>
															<el-dropdown-item command="vv">vv</el-dropdown-item>
															<el-dropdown-item command="ss">ss</el-dropdown-item>
															<el-dropdown-item command="ee">ee</el-dropdown-item>
															<el-dropdown-item command="其他">其他</el-dropdown-item>
														</el-dropdown-menu>
													</el-dropdown> -->
													
													<el-select v-model="ruleForm.endmoney" filterable placeholder="请选择" style="width: 220px;">
    													<el-option :key="3010" label="现款现货" :value="3010" ></el-option>
    													<el-option :key="3011" label="货到付款" :value="3011"></el-option>
    													<el-option :key="3012" label="先款后货" :value="3012"></el-option>
    													<el-option :key="3013" label="账期收款" :value="3013"></el-option>
    													<el-option :key="3014" label="月结" :value="3014"></el-option>
    													<el-option :key="3015" label="季结" :value="3015"></el-option>
    													<el-option :key="3016" label="年结" :value="3016"></el-option>
  													</el-select>
													
												</el-form-item>
											</el-col>

										</el-row>
										<br />

										<div class="text-center-b"><span set-lan="html:选择收货地址">选择收货地址</span>
											<a class="text-a m-l-5" href="/setup/setup.xt?func=contract_ext" target="_blank" data-toggle="tooltip" data-placement="bottom" data-original-title="自定义信息"><i class="fa fa-gear"></i></a>

										</div>

										<!--收货人-->
										<el-row :gutter="20">

											<el-col :span="4">
												<div style="vertical-align:middle;margin-bottom: 0;text-align: right;line-height: 40px;height: 40px;">收货人:</div>
											</el-col>
											<el-col :span="16">
												<el-form-item prop="givemansto">
													<!-- <el-dropdown trigger="click" @command="handleCommand7">
														<span class="el-dropdown-link types" style="display: inline-block; width: 526.66px;height: 40px;border: 1px solid #ddd;border-radius: 5px;vertical-align: middle;line-height: 40px;padding-right: 10px;">
        <span style="text-align: left;margin-left: 10px;">{{ruleForm.givemansto}}</span><i class="el-icon-arrow-down el-icon--right"></i>
														</span>
														<el-dropdown-menu slot="dropdown" style="width: 526.66px;">
															<el-dropdown-item command="aa">aa</el-dropdown-item>
															<el-dropdown-item command="vv">vv</el-dropdown-item>
															<el-dropdown-item command="ss">ss</el-dropdown-item>
															<el-dropdown-item command="ee">ee</el-dropdown-item>
															<el-dropdown-item command="其他">其他</el-dropdown-item>
														</el-dropdown-menu>
													</el-dropdown> -->
													
													<el-select v-model="ruleForm.givemansto" filterable placeholder="请选择" style="width: 526.66px;">
    													<el-option
     													 v-for="item in customertoman"
     													 :key="item.linId"
      													 :label="item.linName"
      													 :value="item.linId">
    													</el-option>
  													</el-select>
													
												</el-form-item>
											</el-col> </el-row> <br />
							</div>
							<div class="text-right p-20">

								<!--<span class="button_close_qshow"><button type="button" class="btn btn-white waves-effect waves-light" data-dismiss="modal" aria-hidden="true"><i class="fa fa-close m-r-5"></i>关闭</button></span>-->
								<div class="btn-save">
									<input name="B0"
										class=" m-l-5 btn btn-white  waves-effect waves-light"
										style="padding-left: 30px" @click="submitForm('ruleForm')"
										type="button" value="保存" set-lan="value:保存">
								</div>
							</div>
							
							<!-- <p v-for="(stu,i) in ruleForm.restaurants">
							{{stu.cus_name}}
							</p> -->
							<!-- {{ruleForm.restaurants}}  --> 

							</el-form>
						</div>
						<!-- 这里是字典表的一些东西 -->
						
						<!-- 这里是字典表的一些东西 -->
				</form>
			</div>
		</div>
	</div>
	</div>

	<script type="text/javascript">
	// var woshilist=document.getElementById('dictionarys').value;
	 
			var vm = new Vue({
				el: ".createOrderbox",
				data: {
					customertoman:[],
					options: [{
						value: '选项1',
						label: '黄金糕'
					}, {
						value: '选项2',
						label: '双皮奶'
					}, {
						value: '选项3',
						label: '蚵仔煎'
					}, {
						value: '选项4',
						label: '龙须面'
					}, {
						value: '选项5',
						label: '北京烤鸭'
					}],
					value5: [],
					value11: [],
					//对应机会
					oppitem:"",
					restaurants:[],
					pickerOptions0: {
				          disabledDate(time) {
				            return time.getTime() < Date.now() - 8.64e7;
				          }
				        }, 
					ruleForm: {
						/*主题*/
						titles: "",
						/*客户*/
						costomers: "",
						costomersfind: "",
						custid:"",
						/*订单号*/
						orderid: "",
						/*分类*/
						cartyrs: "",
						/*付款方式*/
						paytypes: "",
						/*对应机会*/
						opportunity: "",

						havegmoney: "",
						sellmoney: "",
						/*发货时间*/
						havetime: "",
						/*回款时间*/
						haveoldtime: "",
						/*客户签约人*/
						qmans: "",
						sellgoods: "",
						tomans: "",
						returngoods: "",
						/*所有者*/
						users:"",
						/*状态*/
						radio2: 3,
						endmoney: "",
						/*收货人*/
						givemansto: ""
			
					},
					rules: {
						//数据源model
						titles: [
							//非空验证
							{
								required: true,
								message: '请输入获客主题',
								trigger: 'blur'
							},
							//长度验证
							{
								min: 3,
								max:15,
								message: '长度在 3 到 15 个字符',
								trigger: 'blur'
							}
						],
						costomers: [{
							required: true,
							message: '请选择一个客户',
							trigger: 'change'
						}],
						cartyrs: [{
							required: true,
							message: '请选择订单类型',
							trigger: 'change'
						}],
						paytypes: [{
							required: true,
							message: '请选择付款方式',
							trigger: 'change'
						}],
						havetime: [
							//数据类型要是date
							{
								type: 'date',
								required: true,
								message: '请选择日期',
								trigger: 'change'
							}
						],
						haveoldtime: [{
							type: 'date',
							required: true,
							message: '请选择时间',
							trigger: 'change'
						}],
						users: [{
							required: true,
							message: '请选择所有者',
							trigger: 'change'
						}],
						endmoney: [{
							required: true,
							message: '请选择结款方式',
							trigger: 'change'
						}],
						givemansto: [{
							required: true,
							message: '请选择收货人',
							trigger: 'change'
						}]
					}

				},
				methods: {
					handleCommand(command) {
						this.$message('click on item ' + command);
						this.ruleForm.cartyrs = command;
					},
					handleCommand2(command) {
						this.$message('click on item ' + command);
						this.ruleForm.paytypes = command;
					},
					handleCommand4(command) {
						this.$message('click on item ' + command);
						this.ruleForm.qmans = command;
					},
					handleCommand5(command) {
						this.$message('click on item ' + command);
						this.ruleForm.tomans = command;
					},
					handleCommand6(command) {
						this.$message('click on item ' + command);
						this.ruleForm.endmoney = command;
					},
					handleCommand7(command) {
						this.$message('click on item ' + command);
						this.ruleForm.givemansto = command;
					},
						submitForm(formName) {
							//验证方法
							this.$refs[formName].validate((valid) => {
								if(valid) {
									//post提交数据
									axios.post("/addOrderFromItem",
										//参数转换
										Qs.stringify(this.ruleForm, {
											arrayFormat: 'brackets'
										})
										
									).then(function(v) {
										window.parent.location.href="/shozhongordertwo";
									}).catch(function(e) {
										alert("出错了"+e);
									});

								} else {
									console.log('error submit!!');
									return false;
								}
							});
						},
						resetForm(formName) {
							this.$refs[formName].resetFields();
						},
						
						
					      handleSelect(item) {
					        console.log(item);
					        this.ruleForm.costomersfind=item.cus_name;
					        this.ruleForm.costomers=item.cus_name;
							this.ruleForm.custid=item.cus_id;
							
							
							this.ruleForm.opportunity="";
							this.ruleForm.qmans="";
					        // alert("老子被選中了");
					        //访问拿到对应联系人
					        var iosnn=this;
					        
							//post提交数据
							axios.post("/onSale/findByCoustomerName",
								//参数转换
								Qs.stringify({"custid":this.ruleForm.custid}, {
									arrayFormat: 'brackets'
								})		
							).then(function(v) {
								iosnn.oppitem=v.data.opp;
								iosnn.customertoman = v.data.custo;
								console.info(v.data); 
							}).catch(function(e) {
								alert("出错了"+e);
							});
							

							//var cc=${dictionaryitem};
							//console.log(cc); 
					      },
						querySearch(queryString, cb) {
					    	  var allarr = this.restaurants;
					    	 // console.info(allarr);
					    	 
								var newsarr = [];
								allarr.forEach(v => {
									 var strs =v.cus_name+"";
									 if (strs.indexOf(queryString) >= 0) {
											newsarr.push(v);
											console.info(strs);
											console.info(v);
										} 
								})
								// 调用 callback 返回建议列表的数据
								cb(newsarr);
	      				}
					
					      
					      
					
				},mounted() {
					//var dic=${dictionaryitem};
					//console.log(dic); 
					var mas=${mansitem};
					this.restaurants = mas;
					console.log(this.restaurants); 

					/* alert(this.ruleForm.restaurants.cus_name); */

					var ss=${userJson};
					console.log(ss); 
					this.options=ss;
					console.log(this.options[0].useid+"54555445"); 
				}

			});
		</script>
</body>
<!--UTF8-->

</html>